﻿@model Apps.Models.WMS.WMS_Inventory_HModel
@using Apps.Web.Core;
@using Apps.Common;
@using Apps.Models.WMS;
@using Apps.Web;
@using Apps.Locale;
@using Apps.Models.Sys;
@{
    ViewBag.Title = "创建";
    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
    List<permModel> perm = null;
}

<script type="text/javascript">
$(function () {
    $("#btnSave").click(function () {
        if ($("form").valid()) {
            $.ajax({
                url: "@Url.Action("Create")",
                type: "Post",
                data: $("form").serialize(),
                dataType: "json",
                success: function (data) {
                    if (data.type == 1) {
                        window.parent.frameReturnByMes(data.message);
                        window.parent.frameReturnByReload(true);
                        window.parent.frameReturnByClose()
                    }
                    else {
                        window.parent.frameReturnByMes(data.message);
                    }
                }
            });
        }
        return false;
    });
    $("#btnReturn").click(function () {
         window.parent.frameReturnByClose();
    });
});
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByMes(mes) {
$.messageBox5s(Lang.Tip, mes);
}
</script>
<div id="modalwindow" class="easyui-window" style="width:800px; height:400px;" data-options="modal:true,closed:true,minimizable:false,shadow:false"></div>
<div class="mvctool bgb">
    @Html.ToolButton("btnSave", "fa fa-save", Resource.Save, ref perm, "Save", true)
    @Html.ToolButton("btnReturn", "fa fa-reply", Resource.Reply, false)
</div>
@using (Html.BeginForm())
{
    @Html.HiddenFor(model => model.Id, new { @Value = 0 })
    <input id="CreateTime" type="hidden" name="CreateTime" value="2000-1-1" />
    @Html.HiddenFor(model => model.InventoryBillNum)
    <table class="formtable">
        <tbody>
            <tr>
                <th>
                    @Html.LabelFor(model => model.InventoryBillNum)：
                </th>
                <td>
                    @Html.EditorFor(model => model.InventoryBillNum)
                </td>
                <td>@Html.ValidationMessageFor(model => model.InventoryBillNum)</td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.InventoryTitle)：
                </th>
                <td>
                    @Html.EditorFor(model => model.InventoryTitle)
                </td>
                <td>@Html.ValidationMessageFor(model => model.InventoryTitle)</td>
            </tr>
            <tr>
                    <th>
                        @Html.LabelFor(model => model.InventoryType)：
                    </th>
                    <td>
                        @*@Html.EditorFor(model => model.InventoryType)*@
                        @Html.DropDownListFor(model => model.InventoryType, Apps.BLL.Sys.SysParamBLL.GetSysParamByType("InventoryType"))
                    </td>
                    <td>@Html.ValidationMessageFor(model => model.InventoryType)</td>
                </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.InventoryTime)：
                </th>
                <td>
                    @*@Html.TextBoxFor(model => model.InventoryTime, new { @onClick = "WdatePicker()", @style = "width: 105px" })*@
                    @Html.TextBoxFor(model => model.InventoryTime, new { @onClick = "WdatePicker()", @class = "Wdate", @Value = DateTime.Now.ToString("yyyy-MM-dd") })

                </td>
                <td>@Html.ValidationMessageFor(model => model.InventoryTime)</td>
            </tr>
            <tr>
                <th>
                    @Html.LabelFor(model => model.Remark)：
                </th>
                <td>
                    @Html.EditorFor(model => model.Remark)
                </td>
                <td>@Html.ValidationMessageFor(model => model.Remark)</td>
            </tr>
        </tbody>
    </table>
}

